import request from '@/config/axios'

export const CommonApi = {

  indexSummary: async (params: any) => {
    return await request.get({ url: `/su/index/summary`, params })
  },

  // 查询产品分类分页
  getCategoryList: async (params: any) => {
    return await request.get({ url: `/su/category/list`, params })
  },

  // 查询品牌分页
  getBrandList: async (params: any) => {
    return await request.get({ url: `/su/brand/list`, params })
  },

  // 查询公司分页
  getCompanyList: async (params: any) => {
    return await request.get({ url: `/su/company/list`, params })
  },

  // 查询规格名称分页
  getPropertyList: async (params: any) => {
    return await request.get({ url: `/su/property/list`, params })
  },

  // 查询供应商分页
  getSupplierList: async (params: any) => {
    return await request.get({ url: `/su/supplier/list`, params })
  },

  // 查询客户分页
  getCustomerList: async (params: any) => {
    return await request.get({ url: `/su/customer/list`, params })
  },

  getCustomerDetail: async (id: number) => {
    return await request.get({ url: `/su/customer/get?id=` + id })
  },

  // 查询商品分页
  getProductList: async (params: any) => {
    return await request.get({ url: `/su/product/list`, params })
  },

  // 查询商品sku分页
  getProductSkuList: async (params: any) => {
    return await request.get({ url: `/su/product-sku/list`, params })
  },

  getProductDetail: async (id: number) => {
    return await request.get({ url: `/su/product/${id}` })
  },

  // 查询银行信息分页
  getBankInfoList: async (params: any) => {
    return await request.get({ url: `/su/bank-info/list`, params })
  },
}
